package com.add.petback.service.impl;

import com.add.petback.dao.ComplainmentMapper;
import com.add.petback.model.Complainment;
import com.add.petback.service.ComplainmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Complainment)表服务实现类
 *
 * @author makejava
 * @since 2020-03-10 15:54:09
 */
@Service("complainmentService")
public class ComplainmentServiceImpl implements ComplainmentService {

    @Resource
    private ComplainmentMapper mapper;

    @Override
    public void insert(Complainment object) {
        mapper.insertSelective(object);
    }

    @Override
    public void save(Complainment object) {
        mapper.updateByPrimaryKeySelective(object);
    }

    @Override
    public List<Complainment> getAll() {
        return mapper.list(new Complainment());
    }

    @Override
    public Complainment find(Complainment object) {
        return mapper.find(object);
    }

    @Override
    public void delete(Complainment object) {
        mapper.deleteByPrimaryKey(object.getComplainmentpk());
    }

    @Override
    public List<Complainment> getList(Complainment object) {
        return mapper.list(object);
    }

}